import { createApp } from 'vue';
import { ElImage, ElButton } from 'element-plus';
import { createPinia } from 'pinia';

import App from './App.vue';
import router from './router/index';
import 'vue-global-api';
import { registerStore } from '@/store';
import 'element-plus/dist/index.css';
import './utils/rem';
// 需要全局引入再添加
import 'vite-plugin-svg-icons/register';
import svgIcon from './components/common/SvgIcon/index.vue';

// less
import './assets/style/index.less';

const app = createApp(App)
  .use(ElImage)
  .use(ElButton)
  .component('svg-icon', svgIcon);

app.use(createPinia());
// 注册pinia状态管理库
registerStore();

app.use(router);

app.mount('#app');
